<?php
/**
 * FastApp.
 * 8/17/24
 * @Author 深色的海 (wx:deepsea_0024)
 * @Contact telegram:deepsea159 
 */

namespace App\Mall\Api\Controller;

use App\Fastapp\Api\Controller\ApiController;
use App\Mall\Api\Service\MallService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Psr\Http\Message\ResponseInterface;

#[Controller('api/mall')]
class MallController extends ApiController
{
    #[Inject]
    public MallService $service;

    #[GetMapping('category')]
    public function category(): ResponseInterface
    {
        return $this->success($this->service->category());
    }

    #[GetMapping('tag')]
    public function tag(): ResponseInterface
    {
        return $this->success($this->service->tag());
    }
}